package praktikumid.w09.p1;

/**
 * Main.
 * @author Ago
 *
 */
public class Main {

	/**
	 * main.
	 * @param args arguments.
	 */
	public static void main(String[] args) {
		// let's instantiate and init frame
		MyFrame f = new MyFrame();
		// let's make it visible
		f.setVisible(true);
		//stringParsing();
	}
	
	/**
	 * Some examples of string methods.
	 */
	public static void stringParsing() {
		
		String text = "hello world";
		// indexing:
		//          1
		//01234567890
		//hello world
		
		System.out.println(text.charAt(4));
		
		System.out.println(text.indexOf("world"));
		System.out.println(text.indexOf("maailm"));
		// starting looking from index 5
		System.out.println(text.indexOf("o", 5)); 
		
		System.out.println(text.substring(2));
		System.out.println(text.substring(2, 4));
		// 2 inclusive, 4 exclusive
		
		String substring = text.substring(2);
		
		
	}

}
